package controllers;

import models.User;

public class Security extends Secure.Security {

	public static boolean authentify(String username, String password) {
		User user = null;
		if (User.find("byUsername", username.toLowerCase()).fetch().size() > 0) 
		{
			user = (User) User.find("byUsername", username.toLowerCase()).fetch().get(0);
			return user != null && user.password.equals(password);
		}
		
		
		return false;

	}

}